<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>投票页面</title>
    <#include "/common/link.ftl">
    <script type="text/javascript">
        $(function () {


            $('.btn-submit').click(function () {
                var jQuery = $('input[name=ovteItemId]').serialize();

                var val = $('input[name=voteId]').val();
                console.log(jQuery)
                console.log(val)
               window.location.href="/vote/input?voteId="+val+"&"+jQuery;
            })
        })
    </script>

</head>
<body class="hold-transition skin-black sidebar-mini">
<div class="wrapper">
    <#include "/common/navbar.ftl">
    <#assign currentMenu="activity"/>
    <#include "/common/menu.ftl">
    <div class="content-wrapper">
        <section class="content-header">
            <h1>投票页面</h1>
        </section>
        <section class="content">
            <div class="box" style="padding: 10px">
                <div class="row">

                    <div class="col-md-offset-4 col-md-8">
                        <h1>${vote.title}</h1>
                    </div>

                    <div class="col-md-12">
                        <div class="panel panel-default container">
                            <div class="panel-body">
                                <form id="editForm" action="/xxxxx" method="post">
                                    <#list voteItems as v>
                                        <input type="hidden" name="voteId" value="${v.vote.id}">
                                        <div class="row">
                                            <div class="col-md-2">
                                                <div class="radio">
                                                    <label>
                                                        <input type="radio" name="ovteItemId" value="${v.voteTypeId}" id="inputId">
                                                        ${v.voteMessage}
                                                    </label>
                                                </div>
                                        </div>
                                    </div>



                                    </#list>

                                    <button type="button" class="btn btn-primary btn-submit" >提交</button>
                                </form>
                            </div>

                        </div>
                    </div>
                </div>
            </div>
        </section>
    </div>
    <#include "/common/footer.ftl">
</div>
</body>
</html>
